﻿using System;
using System.Security.Cryptography.X509Certificates;

namespace Clarendon.AzureBilling.Library
{
    /// <summary>
    /// A simple type to contain a service management request
    /// </summary>
    // TODO: Consolidate the certificate file path into this structure
    public struct ServiceManagementRequest
    {
        /// <summary>
        /// The base uri used to invoke the Azure RESTful service
        /// </summary>
        public string BaseUri { get; set; }
        /// <summary>
        /// The subscription id used to get the service information
        /// </summary>
        public string SubscriptionId { get; set; }
        /// <summary>
        /// The type of service being requested e.g. hostedservice
        /// </summary>
        public string ServiceType { get; set; }
        /// <summary>
        /// The operation id being used e.g. getservice
        /// </summary>
        public string OperationId { get; set; }
        /// <summary>
        /// Can be GET, PUT, POST, DELETE
        /// </summary>
        public string HttpVerb { get; set; }
        /// <summary>
        /// A XML document containing the details of the POST or PUT
        /// </summary>
        public string Body { get; set; }
        /// <summary>
        /// Add a certificate to the service management request
        /// </summary>
        public X509Certificate2 Certificate { get; set; }
        /// <summary>
        /// Optional data for the request e.g. name of a hosted service 
        /// </summary>
        public string OptionalData { get; set; }
    }
}